//
//  GroupDAO.h
//  iMadeCoreData
//
//  Created by Edward Knutson on 10/13/09.
//  Copyright 2009 Six Four Systems. All rights reserved.
//

#import <Foundation/Foundation.h>

@class Group, TransferGroup;

@interface GroupDAO : NSObject {
	NSManagedObjectContext *context;
}

@property (nonatomic, retain) NSManagedObjectContext *context;

- (id)initWithContext:(NSManagedObjectContext *)ctx;
- (BOOL)saveGroup:(TransferGroup *)group error:(NSError **)error;
- (TransferGroup *)groupForName:(NSString *)name error:(NSError **)error;
- (TransferGroup *)groupForUid:(NSString *)uid error:(NSError **)error;
- (Group *)groupForTransferGroup:(TransferGroup *)transferGroup error:(NSError **)error;
- (NSArray *)groups:(NSError **)error;
- (NSArray *)subscribedGroups:(NSError **)error;
- (NSArray *)tags:(NSError **)error;
- (NSArray *)objectsWithType:(NSString *)type error:(NSError **)error;
- (NSArray *)objectsWithType:(NSString *)type predicate:(NSPredicate *)where error:(NSError **)error;
@end
